import axios from 'axios'
const req = axios.create({
    // baseURL: 'http://toutiao.itheima.net'
    baseURL: '/api',
})


// 请求拦截
req.interceptors.request.use((config) => {
    config.headers.Authorization = sessionStorage.getItem('ihrm')
    return config;
})

//响应拦截器
req.interceptors.response.use((res) => {
    return res
})

export default req